#include "pagrid.h"
/*-------------------------------------------------------------------------*/
/**
  @file		projback.c
  @author	Renaud Wanchoor
  @date	July 2004
  @version	$Revision: 2.6 $
  @brief	project back a graph

*/
/*--------------------------------------------------------------------------*/

/**
 * \brief uncoarsen a graph
 *
 * project back the graph Gk by giving the same processor assignment to each
 * pair, assign the pair in the parent graph with assigned processor number
 * in the child graph
 * \param graph graph to be uncoarsen
 * \param grid computational grid
 * \param info unused
 */
void ProjBack(GraphType *graph, GridType *grid, PartInfoType *info)
{
  int fnvtxs = graph->father->nvtxs;
  int *fpro = graph->father->pro;
  int *fmap = graph->father->map;
  int *gpro = graph->pro;

  int i;
  
  for (i=0; i<fnvtxs; i++)
    fpro[i] = gpro[fmap[i]];
}
